package com.etc.library.service.impl;

import com.etc.library.dao.MessageMapper;
import com.etc.library.pojo.Message;
import com.etc.library.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
public class MessageServiceImpl implements MessageService {

    @Autowired
    private MessageMapper messageMapper;

    @Transactional
    @Override
    public boolean add(List<Message> messages) {
        messageMapper.add(messages);
        return true;
    }
}
